<block name="header">
  <div id="site-nav">
    <div class="container">
      <p class="col-xs-4">嗨~，欢迎来到{:C('WEB_SITE_TITLE')}！</p>
      <div class="col-xs-8">
      <ul class="right">
        <if condition="!empty(session('zone.title')) && $zone_price">
          <li>{:session('zone.title')}
          <!-- <a href="{:U('Index/changecity')}">[ 切换 ]</a> -->
          </li>
        </if>
        <!--{//附近店铺信息}-->
        <php>$zone_price = C('START_POSITION');  $recommended_store = C('RECOMMENDED_SHOP'); $search_shops = C('SEARCH_SHOPS'); $store_list = $_SESSION['jipushop_home']['store_list'];</php>
      <if condition="$zone_price">
        <if condition="($recommended_store eq 1) OR ($search_shops eq 1)">
        <notempty name="store_list">
            <li class="user"><a href="javascript:;">本市其他商家<i class="sanjiao"></i></a>
                <ul id="ulul" class="menu-sub" style="overflow-y:hidden">
                  <volist name="store_list" id="svo">
                    <li><a href="{:U('Store/index/store_id/'.$svo['store_id'])}">{$svo.store_name}</a></li>
                  </volist>
                </ul>
            </li>
        </if>
        </notempty>
      </if>
        <if condition="is_login()">
          <li><a href="{:U('Member/index')}" class="text-danger" title="{:get_nickname()}">{:get_short(get_nickname(), 6)}</a></li>
          <li><a href="{:U('User/logout')}">[ 退出 ]</a></li>
        <else/>
          <li><a href="{:U('User/login')}">登录</a></li>
          <li><a href="{:U('User/register')}">注册</a></li>
        </if>
        <if condition="is_shop()">
          <!-- <li><a href="{:U('Shop/Seller/login')}" target="_blank">商家管理后台</a></li> -->
          <li><a href="{:U('Shop/Store/index')}" target="_blank">商家管理后台</a></li>
          <else/>
          <li><a href="{:U('Settle/index')}">商家入驻</a></li>
        </if>
        <li class="user"><a href="{:U('Member/index')}" target="_blank">个人中心<i class="sanjiao"></i></a>
          <ul class="menu-sub">
            <li><a href="{:U('Member/order')}" target="_blank">我的订单</a></li>
            <li><a href="{:U('Member/coupon')}" target="_blank">我的优惠券</a></li>
            <li><a href="{:U('Member/fav')}" target="_blank">我的收藏</a></li>
            <li><a href="{:U('Member/invite')}" target="_blank">我的邀请</a></li>
          </ul>
        </li>
        <li><a href="http://www.shante.me">闪特首页</a></li>
        <li><a href="javascript:;" class="Z_app_qrcode" target="_blank" url="{:get_cover(C('WAP_QRCODE'),'path')}"><i class="icon icon-phone"></i>手机版</a></li>
      </ul>
      </div>
    </div>
  </div>
  <div class="header">
    <!-- 顶部logo & 搜索 -->
    <div class="container">
      <div class="row header-top">
        <div class="col-xs-4">
          <a href="{:U('/')}" class="logo"><img src="{:get_cover(C('LOGO'),'path')}"></a>
        </div>
        <div class="col-xs-8">
        	<ul class="header-right">
                <li class="search-box">
                  <form action="{:U('Item/search')}" class="form-inline search text-center">
                    <div class="form-group">
                      <input type="search" name="keyword" class="form-control" value="{$keyword}" autocomplete="off" placeholder="搜索您要购买的商品">
                    </div>
                    <button type="submit" class="btn btn-positive">搜索</button>
                  </form>
                </li>
                <li class="cart-box">
                  <a href="{:U('Cart/index')}" class="btn btn-positive">
                    <i class="icon <gt name="user_count.cart_count" value="0">icon-cart-fill<else/>icon-cart</gt>"></i>我的购物车
                    <span id="J_cart_quantity" class="badge"><notempty name="user_count.cart_count">{$user_count.cart_count}<else/>0</notempty></span>
                    <em id="J_cart_plus">1</em>
                  </a>
                </li>
            </ul>
        </div>
      </div>
    </div>

    <!-- 主导航 -->
    <div class="navbar">
      <div class="container">
        <div id="J_navbar_header" class="navbar-header">
          <a class="navbar-brand" href="{:U('Item/search')}">浏览全部商品 <i class="icon icon-arrow-bottom"></i></a>
          <!-- 全部商品分类 -->
          {:W('ItemCategory/cate_new')}
        </div>
        <div class="navbar-collapse collapse navbar-inverse-collapse">
          <ul class="nav navbar-nav">
            <think:nav name="nav" position="2" pid="0">
              <eq name="nav.pid" value="0">
                <li class="<notempty name="nav.url"><eq name="nav.url|get_nav_url" value="__SELF__">active</eq><else/><eq name="key" value="0">active</eq></notempty> J_nav_item">
                  <a href="{$nav.url|get_nav_url}" target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>"><span class="text">{$nav.title}</span></a>
                </li>
              </eq>
            </think:nav>
          </ul>
          <!-- 导航栏右侧 -->
          <div class="nav navbar-nav navbar-right navbar-info">
            <span class="info">客服热线：<em class="text-danger"><a href="tel://{:C('WEB_SITE_TEL')}">{:C('WEB_SITE_TEL')}</a></em></span>
          </div>
        </div>
      </div>
    </div>
  </div>
</block>
